package com.bdqn.newdream.Impl;

import com.bdqn.newdream.javabean.AProblem;
import com.bdqn.newdream.javabean.Problemlist;
import com.bdqn.newdream.pojo.Problem;
import com.bdqn.newdream.pojo.ProblemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface ProblemMapper {
    int countByExample(ProblemExample example);

    int deleteByExample(ProblemExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Problem record);

    int insertSelective(Problem record);

    List<Problem> selectByExampleWithBLOBs(ProblemExample example);

    List<Problem> selectByExample(ProblemExample example);

    Problem selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Problem record, @Param("example") ProblemExample example);

    int updateByExampleWithBLOBs(@Param("record") Problem record, @Param("example") ProblemExample example);

    int updateByExample(@Param("record") Problem record, @Param("example") ProblemExample example);

    int updateByPrimaryKeySelective(Problem record);

    int updateByPrimaryKeyWithBLOBs(Problem record);

    int updateByPrimaryKey(Problem record);
    /*
     * 登陆后的状态,查询问题列表2.0v
     */
    List<Problemlist> selectProblemlist(@Param(value="id")Integer id,@Param(value="uid")Integer uid,@Param(value="page")Integer page);
    
    /*
     * 未登陆的状态,查询问题列表2.0v
     */
    List<Problemlist> Problemlist(@Param(value="id")Integer id,@Param(value="page")Integer page);
    /*
     * 统计问题总数
     */
    Integer countProblemlist(Integer state);
    
    /*
     * 查询问题的内容
     */
    AProblem aProblem(@Param(value="state")Integer state,@Param(value="id")Integer id,@Param(value="uid")Integer uid);
    /*
     * 查询问题的内容
     */
    AProblem reProblem(@Param(value="state")Integer state,@Param(value="id")Integer id);

    Integer delectAProbleam(Integer id);
    
    Integer selectaddnum(Integer  id);
    
    List<Problem> firstnum(Integer  id);
    
    List<Problemlist> firstcount(Integer  id);
    
    List<Problemlist> likeprobleam(Integer state,String title,Integer page);
    
    Integer countlike(Integer state,String title);
}